export const menuTab = [
  {
    title: "审核数据",
    key: "1",
  },
  {
    title: "确认数据",
    key: "2",
  },
];

export const listdata = [
  {
    id: "1",
    no: "JDX63321",
    status: "WAIT_FINISH",
    deviceName: "设备点检记录",
    deviceNo: "0000141",
    beginTime: "2020-06-01",
    submitTime: " 2020-09-23",
    totalTime: "10",
    result: "合格",
    classes: "白班",
    executor: "王小明",
  },
  {
    id: "2",
    status: "WAIT_FINISH",
    deviceName: "设备点检记录2",
    deviceNo: "0000141",
    beginTime: "2020-06-01",
    submitTime: " 2020-09-23",
    totalTime: "10",
    result: "合格",
    classes: "白班",
    executor: "王小明",
  },
];

const STATUS_LIST = [
  {
    label: "待处理",
    value: "WAIT_FINISH",
  },
  {
    label: "进行中",
    value: "PROCESSING",
  },
  {
    label: "已处理",
    value: "FINISH",
  },
  {
    label: "已确认",
    value: "CONFIRMED",
  },
  {
    label: "取消待审核",
    value: "CANCEL_PENDING_APPROVAL",
  },
  {
    label: "变更待审核",
    value: "CHANGE_PENDING_APPROVAL",
  },
  {
    label: "已取消",
    value: "CANCEL",
  },
];

const getcolor = (status) => {
  if (status == "WAIT_FINISH" || status == "CANCEL_TO_BE_CONFIRMED") {
    return "WAIT_FINISH";
  } else if (status == "PROCESSING" || status == "REPAIRING") {
    return "PROCESSING";
  } else if (status == "REPAIRED_TO_BE_CONFIRMED") {
    return "REPAIRED_TO_BE_CONFIRMED";
  }
};
export const listFields1 = {
  title: {
    label: "单据号",
    value: "no",
  },
  children: [
    {
      label: "状态",
      value: "status",
      statusList: STATUS_LIST,
      statusColor: getcolor,
    },
    {
      label: "设备名称",
      value: "deviceName",
    },
    {
      label: "固资编码",
      value: "longTermAsseCode",
    },
    {
      label: "执行计划名称",
      value: "strategyNames",
    },
    {
      label: "计划处理时间",
      value: "planInspectionTime",
    },
    {
      label: "班次",
      value: "shiftType",
    },
    {
      label: "取消原因",
      value: "cancelReason",
    },
    {
      label: "取消/更改人",
      value: "updateName",
    },
  ],
};

export const listFields2 = {
  title: {
    label: "单据号",
    value: "no",
  },
  children: [
    {
      label: "状态",
      value: "status",
      statusList: STATUS_LIST,
      statusColor: getcolor,
    },
    {
      label: "设备名称",
      value: "deviceName",
    },
    {
      label: "固资编码",
      value: "longTermAsseCode",
    },
    {
      label: "执行计划名称",
      value: "strategyNames",
    },
    {
      label: "计划处理时间",
      value: "planInspectionTime",
    },
    {
      label: "实际开始时间",
      value: "actualStartTime",
    },
    {
      label: "实际处理时间",
      value: "actualInspectionTime",
    },
    {
      label: "人数",
      value: "number",
    },
    {
      label: "总用时",
      value: "useSumTime",
    },
    {
      label: "班次",
      value: "shiftType",
    },
    {
      label: "保养人",
      value: "updateName",
    },
  ],
};
